<include file="Public:header"/>
<script type="text/javascript" src="__WEBPUBLIC__/Admin/laydate/laydate.js"></script>
<!--主页面-->
<div id="main-content" class="content">
    <ul class="breadcrumb">
        <li><a href="/">首页</a></li>
        <li class="active"><a href="">商家管理</a></li>
        <li class="active">商家列表</li>
    </ul>

    <div class="page-header page-header1 clearfix">
        <h3>商家管理</h3>
        <ul class="nav nav-tabs">    
            <li class="active">
                <a href="javascript:;">商家列表</a>
            </li>
            <li>
                <a href="{:U('Shop/addShop')}">添加商家</a>
            </li>
        </ul>
    </div>
    <div class="search-content">
        <form action="{:U('Shop/shopList')}" method="post"class="search-form form-inline" role="form">
            <div class="form-group">
                <label class="sr-only" for="name">商家名称</label>
                <input class="earch-input form-control" id="name" type="text" name="name" value="{$request['name']}" placeholder="商家名称"/>　
            </div>
            <div class="form-group">
                <label class="sr-only" for="account">商家账号</label>
                <input class="earch-input form-control" id="account" type="text" name="account" value="{$request['account']}" placeholder="商家账号"/>　
            </div>
            &nbsp;&nbsp;
            <input placeholder="请输入开始日期" name="start_time" value="{$start_time}" class="laydate-icon" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" style="width: 180px;height:34px;border-radius:5px">&nbsp;&nbsp;
            <input placeholder="请输入结束日期" name="end_time" value="{$end_time}" class="laydate-icon" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" style="width: 180px;height:34px;border-radius:5px">
            <style>
                #laydate_ys{
                    overflow: hidden;!important;
                }
                .laydate_body .laydate_bottom{
                    height: 40px;!important;
                }
            </style>
            <button type="submit" class="btn derive">查询</button>　
        </form>
    </div>
    <div class="content-box-table">
        <form action="{:U('Shop/deleteShop')}" method="post" class="batch-form">
            <table class="table table-striped table-framed table-hover">
                <thead>
                    <tr>
                        <th width="4%">
                            <input class="check-all" type="checkbox" />
                        </th>
                        <th>ID</th>
                        <th>入驻时间</th>
                        <th>商家名称</th>
                        <th>账号</th>
                        <th>封面图</th>
                        <th width="12%">操作</th>
                    </tr>
                </thead>
                <tbody class="tbody">
                    <if condition="empty($list)">
                        <tr style="font-size:14px;text-align: center;"><td colspan="20">暂无数据</td></tr>
                    </if>
                    <volist name="list" id="vo">
                        <tr>
                            <td><input type="checkbox" value="{$vo['shop_id']}" name="shop_id[]"/></td>
                            <td>{$vo['shop_id']}</td>
                            <td>{$vo['ctime']|date='Y-m-d',###}</td>
                            <td>{$vo['name']|default="未填写"}</td>
                            <td>{$vo['account']|default="未填写"}</td>
                            <td>
                                <if condition="$vo['head_pic'] neq ''">
                                    <img src="/{$vo['head_pic']}" style="max-width: 100px;max-height: 100px;">
                                </if>
                            </td>
                            <td>
                                <a href="{:U('Picture/pictureList',array('shop_id'=>$vo['shop_id']))}" title="查看相册" class="modify">
                                   <span class="icon glyphicon glyphicon-picture"></span>
                                </a>&nbsp;
                                <!--<a href="{:U('News/newsList',array('shop_id'=>$vo['shop_id']))}" title="查看新闻" class="modify">-->
                                <!--<span class="icon glyphicon glyphicon-book"></span>-->
                            <!--</a>&nbsp;-->

                                <a href="{:U('Article/articleList',array('shop_id'=>$vo['shop_id']))}" title="查看文章" class="modify">
                                    <span class="icon glyphicon glyphicon-list-alt"></span>
                                </a>&nbsp;&nbsp;
                                <a href="{:U('Message/messageList',array('shop_id'=>$vo['shop_id']))}" title="查看留言" class="modify">
                                    <span class="icon glyphicon glyphicon-align-justify"></span>
                                </a>&nbsp;&nbsp;
                                <a href="{:U('Shop/editShop',array('id'=>$vo['shop_id']))}" title="编辑" class="modify">
                                <span class="icon glyphicon glyphicon-edit"></span>
                            </a>&nbsp;&nbsp;
                                <a href="{:U('Shop/resetPwd',array('id'=>$vo['shop_id']))}" title="重置密码" class="modify">
                                    <span class="icon glyphicon glyphicon-pencil"></span>
                                </a>&nbsp;&nbsp;
                                <a href="#" title="删除" class="delete-delete">
                                    <span class="icon glyphicon glyphicon-remove"></span>
                                </a>
                                <input type="hidden" value="{:U('Shop/deleteShop',array('shop_id'=>$vo['shop_id']))}">
                            </td>
                        </tr>
                    </volist>
                </tbody>
                <tfoot>
                    <tr>
                        <td colspan="20">
                            <div class="bulk-actions fl">
                                <input type="button" class="btn delete-batch" value="批量删除">
                            </div>
                            <div class="fr">
                                {$page}
                            </div>
                        </td>
                    </tr>
                </tfoot>
            </table>
        </form>
    </div>
</div>

<include file="Public:footer"/>
